<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
	<head>
		<%@ include file="/common/meta.jsp"%>
		<link rel="stylesheet" type="text/css" href="<s:url value="/grid/gt_grid.css"/>" />
		<link rel="stylesheet" type="text/css" href="<s:url value="/grid/skin/default/skinstyle.css"/>" />
		<link rel="stylesheet" type="text/css" href="<s:url value="/grid/skin/china/skinstyle.css"/>" />
		<link rel="stylesheet" type="text/css" href="<s:url value="/grid/skin/vista/skinstyle.css"/>" />
		<link rel="stylesheet" type="text/css" href="<s:url value="/grid/skin/mac/skinstyle.css"/>" />
		<script type="text/javascript" src="<s:url value="/grid/gt_msg_cn.js"/>"></script>
		<script type="text/javascript" src="<s:url value="/grid/gt_grid_all.js"/>"></script>
	</head>
	
	<body style="margin: 0px; margin: 2px;">
	<s:form name="dForm" id="dForm" action="dwsbquery!query.do">
		<table width="100%" cellpadding="0" cellspacing="0" id="conTable" >
					<tr>
					    <td class="lefttop"></td>
					    <td width="%"  class="centertop"></td>
					    <td class="righttop"></td>
				    </tr>
					<tr>
						<td height="26" class="leftcenter">&nbsp;</td>
					    <td class="center" >
					    	查询条件：
					    	<s:select id="xlxtype" name="xlxtype" list="xlxtypes" cssStyle="width:150" listKey="dm" listValue="mc" onchange="changeDm(this.value)"/>
					    	<span id="jbdiv1" style="display:none">
					    		<s:select id="jbdm" name="jbdm" list="jbdms" cssStyle="width:200" listKey="dm" listValue="mc"  headerKey="" headerValue="--请选择季报--"/>
					    	</span>
					    	<span id="jbdiv2" style="display:none">
					    		<s:select id="jbdmlx" name="jbdmlx" list="jbdmlxs" cssStyle="width:200" listKey="dm" listValue="mc"  headerKey="" headerValue="--请选择机构性质--" />
					    	</span>
					    	<input type="button" id="queryBtn" class="but" value="查   询" id="b_sendmessage" onclick="doquery()">
					    	<input type="button" class="but" value="高级查询" id="" onclick="dofilter();">
					    </td>
					   	<td class="rightcenter"></td>
					</tr>	
				   <tr>
					    <td class="leftbot"></td>
					    <td class="centerbot"></td>
					    <td class="rightbot"></td>
				   </tr>
			</table>
			<div id="mygrid_container" style="width:100%;" ></div>
	</s:form>		
	</body>
	<script type="text/javascript">

		
	var APP_PATH = '<c:url value="/"/>';
	var grid_demo_id = "myGrid1";
	var dsOption = {
		fields :  [ {name : 'SBDM'},
					{name : 'SBDM_MC'},
					{name : 'ZCZJ'},  
					{name : 'QYMC'}, 
		   		    {name : 'QYDJZCLX_MC'}, 
		   		    {name : 'ZRQYRS'},
					{name : 'CDGLGJDFXMS'},
					{name : 'HYLB'},
					{name : 'BSRS'},
					{name : 'GJJXMS'},
					{name : 'GXJSQY'},
					{name : 'SSRS'},
					{name : 'SJXMS'},
					{name : 'SFSSQY'},
					{name : 'YJSJYSXLS'},
					{name : 'SSJXMS'},
					{name : 'YFJGS'},
					{name : 'BKXLS'},
					{name : 'QJXMS'},
					{name : 'GXJSCPS'},
					{name : 'DZXLS'},
					{name : 'GLGJDFDZJF'},
					{name : 'GJJXMJF'},
					{name : 'SJXMJF'},
					{name : 'SSJXMJF'},
					{name : 'QJXMJF'},
					{name : 'CDGLQYXMS'},
					{name : 'GLQYXMDZJF'},
					{name : 'KJHDJFZCZE'},
					{name : 'YJSYFZZC'},
					{name : 'XCPKFJFZC'},
					{name : 'GJZCS'},
					{name : 'HGJWJZJRS'},
					{name : 'GJZCHBSRS'},
					{name : 'ZRQYZSR'},
					{name : 'ZRQYGYZCZ'},
					{name : 'ZRQYJLR'},
					{name : 'ZRQYSJSJ'},
					{name : 'ZRQYCKCH'},
					{name : 'ZBSQTDQKPXS'},
					{name : 'SQZLS'},
					{name : 'FMZLS'},
					{name : 'QZSQZLS'},
					{name : 'QZFMZLS'},
					{name : 'GMGWJSZLS'},
					{name : 'STATUS'}
					/*,
					{name : 'url' }
					*/
					]
	};

	var colsOption = [ 
	  {
		id : 'STATUS',
		header : "状态",
		headAlign:"center",
		width : 100,
		align : "left",
		renderer:function (v){var str ="待上报"; if(v==5){str="数据已上报(待审)";}else if(v==3){str="数据审核通过";}else if(v==4){str="<font color=red>数据审核退回</font>";} return str;}
	},{
		id : 'SBDM_MC',
		header : "季报名称",
		headAlign:"center",
		width : 150,
		align : "left",
		renderer:function (v,r){return '<a href="dwsbquery!dwsb1view.do?sbdm='+r.SBDM+'" target=_blank title="点击查看详细信息">'+v+'</a>';}
	},{
		id : 'QYMC',
		header : "企业名称",
		headAlign:"center",
		width : 120,
		align : "left",
		renderer:function (v,r){return '<a href="dwsbquery!dwsb1view.do?sbdm='+r.SBDM+'" target=_blank title="点击查看详细信息">'+v+'</a>';}
	}, {
		id : 'ZCZJ',
		header : "注册资金(万元)",
		width : 40,
		align : "center"
		
	}, {
		id : 'QYDJZCLX_MC',
		header : "企业登记注册类型",
		headAlign:"center",
		width : 100,
		align : "left"
	}, 
	 {
		id : 'HYLB',
		header : "行业类别",
		headAlign:"center",
		width : 100,
		align : "left"
	},{
		id : 'YFJGS',
		header : "研发机构数",
		headAlign:"center",
		width : 80,
		align : "center"
	}, {
		id : 'GXJSCPS',
		header : "高新技术产品数",
		headAlign:"center",
		width : 150,
		align : "left"
	}, {
		id : 'ZRQYZSR',
		header : "在孵企业总收入",
		headAlign:"center",
		align : "left"
	}, {
		id : 'ZRQYGYZCZ',
		header : "在孵企业工业总产值",
		width : 70,
		headAlign:"center",
		align : "center"
	}, {
		id : 'ZRQYJLR',
		header : "在孵企业净利润",
		width : 70,
		headAlign:"center",
		align : "center"
	}, {
		id : 'ZRQYSJSJ',
		header : "在孵企业上缴税金",
		width : 100,
		headAlign:"center",
		align : "left"

	}, {
		id : 'ZRQYCKCH',
		header : "在孵企业出口创汇",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'ZBSQTDQKPXS',
		header : "在本市其他地区开票销售",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'ZRQYRS',
		header : "在孵企业从业人员数",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'BSRS',
		header : "在孵企业从业人员数(博士)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'SSRS',
		header : "在孵企业从业人员数(硕士)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'YJSJYSXLS',
		header : "在孵企业从业人员数(研究生学历及以上)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'BKXLS',
		header : "在孵企业从业人员数(本科学历)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'DZXLS',
		header : "在孵企业从业人员数(大专学历)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'GJZCS',
		header : "在孵企业从业人员数(高级职称)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'HGJWJZJRS',
		header : "在孵企业从业人员数(海归人才及外籍专家人员数)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'GJZCHBSRS',
		header : "在孵企业从业人员数(高级职称或博士学位人员数)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'SQZLS',
		header : "申请专利项数",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'FMZLS',
		header : "申请专利项数(发明专利)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'QZSQZLS',
		header : "授权专利项数",
		headAlign:"center",
		align : "left"
	}, {
		id : 'QZFMZLS',
		header : "授权专利项数(发明专利)",
		headAlign:"center",
		align : "left"
	}, {
		id : 'GMGWJSZLS',
		header : "购买国外技术专利数",
		headAlign:"center",
		align : "left"
	}, {
		id : 'CDGLGJDFXMS',
		header : "承担各类国家和地方项目数",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'GJJXMS',
		header : "承担各类国家和地方项目数(国家级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'SJXMS',
		header : "承担各类国家和地方项目数(省级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'SSJXMS',
		header : "承担各类国家和地方项目数(市级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'QJXMS',
		header : "承担各类国家和地方项目数(区级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'GLGJDFDZJF',
		header : "各类国家和地方项目到帐经费",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'GJJXMJF',
		header : "各类国家和地方项目到帐经费(国家级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'SJXMJF',
		header : "各类国家和地方项目到帐经费(省级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'SSJXMJF',
		header : "各类国家和地方项目到帐经费(市级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	}, {
		id : 'QJXMJF',
		header : "各类国家和地方项目到帐经费(区级项目)",
		width : 100,
		headAlign:"center",
		align : "left"
	},{
		id : 'CDGLQYXMS',
		header : "承担各类企业项目数",
		headAlign:"center",
		align : "left"
	},{
		id : 'GLQYXMDZJF',
		header : "各类企业项目到帐经费",
		headAlign:"center",
		align : "left"
	},
	{
		id : 'KJHDJFZCZE',
		header : "科技活动经费支出总额",
		width : 100,
		headAlign:"center",
		align : "left"
	},
	{
		id : 'YJSYFZZC',
		header : "研究与试验发展支出",
		width : 100,
		headAlign:"center",
		align : "left"
	},
	{
		id : 'XCPKFJFZC',
		header : "新产品开发经费支出",
		width : 100,
		headAlign:"center",
		align : "left"
	}
	 ];

	var gridOption = {
		id : grid_demo_id,
		skin : "vista",
		width : "100%",
		height : (getSize().h - 60) + "px",
		pageSize : 25,
		container : 'mygrid_container',
		showGridMenu : true,
		allowCustomSkin : true,
		allowFreeze : true,
		allowHide : true,
		allowGroup : true,
		stripeRows : true,
		toolbarContent : 'nav | goto | pagesize | reload | export xls | print | filter | state | info',
		pageSizeList : [ 25, 50, 100, 200, 500 ],
		lightOverRow : true,
		showIndexColumn : false,
		dataset : dsOption,
		columns : colsOption,
		remoteSort : true,
		remoteFilter : true,
		loadURL : APP_PATH + '/dwsbquery!getList.do?jbdm='+$F('jbdm')+'&jbdmlx='+$F('jbdmlx'),
		exportURL : APP_PATH + '/dwsbquery!exportList.do?jbdm='+$F('jbdm')+'&jbdmlx='+$F('jbdmlx'),
		exportFileName : "列表",
		autoLoad : true,
		showIndexColumn : true,
		parameters:{}
	};
	var mygrid = new Sigma.Grid(gridOption);
	Event.observe(window, "load", function() {
		mygrid.render();
	}, true);
	
	function doquery(){
		if($('jbdm').value =='' && $('jbdmlx').value == ''){
			alert('请选择相应的查询条件');
			return false;
		}
		document.forms[0].submit();
	}
	
	isDivJb($('xlxtype').value);
	function isDivJb(v){
		if(v == 1){
			$('jbdiv1').style.display='';
			$('jbdiv2').style.display='none';
		}else{
			$('jbdiv1').style.display='none';
			$('jbdiv2').style.display='';
		}
	}
	function changeDm(v){
		$('jbdmlx').value= '';
		$('jbdm').value = '';
		if(v == 1){
			$('jbdiv1').style.display='';
			$('jbdiv2').style.display='none';
		}else{
			$('jbdiv1').style.display='none';
			$('jbdiv2').style.display='';
		}
	}
	function dofilter(){
		mygrid.showDialog("filter");
	}	
	</script>
</html>

